#include<bits/stdc++.h>
using namespace std;
int a[100001];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
        scanf("%d",&a[i]);
    sort(a,a+n);
    int b=0;
    for(int i=n-1,j=n-1;i>=0,j>=0;i--,j--){
        while(j>=0&&a[j]==a[i])
            j--;
        if(j>=0)
            b++;
    }
    printf("%d",n-b);
    return 0;
}